<%

Dim arMenu(3)

Dim ClientInfo
Dim UserAcc
Dim ProjecMgt
Dim DropBox

Dim intMenu


ClientInfo	= Array("Client Information", 2, "client.asp", "imgCN")
UserAcc		= Array("User Account", 1, "user.asp", "imgUA")
ProjectMgt	= Array("Project Management", 3, "project.asp", "imgPM")
DropBox		= Array("Drop Box", 2, "dropbox.asp", "imgDX")

arMenu(0) = ClientInfo
arMenu(1) = UserAcc
arMenu(2) = ProjectMgt
arMenu(3) = DropBox




intMenu = 1
' Render menu as HTML

For i=0 To UBound(arMenu)
	If arMenu(i)(1) >= CLng(Request.Cookies("irl_security")) Then
		If arMenu(i)(0)=cMenu Then 
			renderMenu "", arMenu(i)(3), arMenu(i)(0)
		Else
			If intMenu=cMenu Then
				renderMenu "", arMenu(i)(3), arMenu(i)(0)
			Else
				renderMenu arMenu(i)(2), arMenu(i)(3), arMenu(i)(0)
			End if
			intMenu = intMenu + 1
		End if
	End if
Next

'Response.Cookies("irl_security") = 3

Erase ClientInfo
Erase UserAcc
Erase ProjectMgt
Erase DropBox

Erase arMenu

%>

<%
' Write Menu Procedure
' GO here
Sub renderMenu(url, imgName, text)
	Dim html
	html = "<tr><th height=""25"" scope=""row"">&nbsp;</th>" & vbCrlf
	
	If url = "" Then
		html = html & "<td align=""left"" class=""SubMenu"" style=""padding-left:12px;"">"& _
						"<img src=""images/arrow.gif"" name="""& imgName &""" width=""13"" height=""15"" border=""0"">"& text &"</td></tr>" & vbCrlf
		
		html = html & renderSubMenu
	Else
		html = html & "<td align=""left"" class=""Content"" style=""padding-left:12px;"">"& _
						"<a href="""& url &""" class=""SubMenu"" onMouseOut=""MM_swapImgRestore()"" onMouseDown=""mDown=1;return true"" onMouseOver=""MM_swapImage('"& imgName &"','','images/arrowHover.gif',1);""><img src=""images/arrow.gif"" name="""& imgName &""" width=""13"" height=""15"" border=""0"">"& text &"</a></td></tr>" & vbCrlf
	End if
	
	
	Response.Write(html)
	
End Sub


' Return html For sub menu
Function renderSubMenu()
	Dim html, i
	Dim imgName
	
	html = ""
	
	
	If IsArray(arSubMenu) Then
	
		For i=0 To UBound(arSubMenu)
			imgName = Replace(arSubMenu(i), " ", "_")
			
			html = html & "<tr><th height=""25"" scope=""row"">&nbsp;</th>" & vbCrlf & _
						"<td align=""left"" class=""Content"" style=""padding-left:24px;"">"
			
			If arSubMenuLink(i) = "" Then
				html = html & "<img src=""images/arrowHover.gif"" name="""& imgName &""" width=""13"" height=""15"" border=""0""><span class=""SelMenu"">"& arSubMenu(i) &"</span>"
			Else
				html = html & "<a href="""& arSubMenuLink(i) &""" class=""SubMenu"" onMouseOut=""MM_swapImgRestore()"" onMouseDown=""mDown=1;return true"" onMouseOver=""MM_swapImage('"& imgName &"','','images/arrowHover.gif',1)""><img src=""images/arrow.gif"" name="""& imgName &""" width=""13"" height=""15"" border=""0"">"& arSubMenu(i) &"</a></td>"
			End if
			
			html = html & "</td></tr>" & vbCrlf
		Next
	End if
	
	renderSubMenu = html
	
End function

%>
